3.37 \(\int (a+b \csc (c+d x))^3 \, dx\)

Optimal. Leaf size=73 \[ a^3 x-\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]

[Out]

a^3*x-1/2*b*(6*a^2+b^2)*arctanh(cos(d*x+c))/d-5/2*a*b^2*cot(d*x+c)/d-1/2*b^2*cot(d*x+c)*(a+b*csc(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3782, 3770, 3767, 8} \[ -\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}+a^3 x-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Csc[c + d*x])^3,x]

[Out]

a^3*x - (b*(6*a^2 + b^2)*ArcTanh[Cos[c + d*x]])/(2*d) - (5*a*b^2*Cot[c + d*x])/(2*d) - (b^2*Cot[c + d*x]*(a +
b*Csc[c + d*x]))/(2*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3782

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> -Simp[(b^2*Cot[c + d*x]*(a + b*Csc[c + d*x])^(n
- 2))/(d*(n - 1)), x] + Dist[1/(n - 1), Int[(a + b*Csc[c + d*x])^(n - 3)*Simp[a^3*(n - 1) + (b*(b^2*(n - 2) +
3*a^2*(n - 1)))*Csc[c + d*x] + (a*b^2*(3*n - 4))*Csc[c + d*x]^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a
^2 - b^2, 0] && GtQ[n, 2] && IntegerQ[2*n]

Rubi steps

\begin {align*} \int (a+b \csc (c+d x))^3 \, dx &=-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac {1}{2} \int \left (2 a^3+b \left (6 a^2+b^2\right ) \csc (c+d x)+5 a b^2 \csc ^2(c+d x)\right ) \, dx\\ &=a^3 x-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac {1}{2} \left (5 a b^2\right ) \int \csc ^2(c+d x) \, dx+\frac {1}{2} \left (b \left (6 a^2+b^2\right )\right ) \int \csc (c+d x) \, dx\\ &=a^3 x-\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}-\frac {\left (5 a b^2\right ) \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{2 d}\\ &=a^3 x-\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.63, size = 152, normalized size = 2.08 \[ \frac {8 a^3 c+8 a^3 d x+24 a^2 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-24 a^2 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+12 a b^2 \tan \left (\frac {1}{2} (c+d x)\right )-12 a b^2 \cot \left (\frac {1}{2} (c+d x)\right )-b^3 \csc ^2\left (\frac {1}{2} (c+d x)\right )+b^3 \sec ^2\left (\frac {1}{2} (c+d x)\right )+4 b^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-4 b^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Csc[c + d*x])^3,x]

[Out]

(8*a^3*c + 8*a^3*d*x - 12*a*b^2*Cot[(c + d*x)/2] - b^3*Csc[(c + d*x)/2]^2 - 24*a^2*b*Log[Cos[(c + d*x)/2]] - 4
*b^3*Log[Cos[(c + d*x)/2]] + 24*a^2*b*Log[Sin[(c + d*x)/2]] + 4*b^3*Log[Sin[(c + d*x)/2]] + b^3*Sec[(c + d*x)/
2]^2 + 12*a*b^2*Tan[(c + d*x)/2])/(8*d)

________________________________________________________________________________________

fricas [B]  time = 0.55, size = 155, normalized size = 2.12 \[ \frac {4 \, a^{3} d x \cos \left (d x + c\right )^{2} - 4 \, a^{3} d x + 12 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 2 \, b^{3} \cos \left (d x + c\right ) + {\left (6 \, a^{2} b + b^{3} - {\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (6 \, a^{2} b + b^{3} - {\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*csc(d*x+c))^3,x, algorithm="fricas")

[Out]

1/4*(4*a^3*d*x*cos(d*x + c)^2 - 4*a^3*d*x + 12*a*b^2*cos(d*x + c)*sin(d*x + c) + 2*b^3*cos(d*x + c) + (6*a^2*b
 + b^3 - (6*a^2*b + b^3)*cos(d*x + c)^2)*log(1/2*cos(d*x + c) + 1/2) - (6*a^2*b + b^3 - (6*a^2*b + b^3)*cos(d*
x + c)^2)*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^2 - d)

________________________________________________________________________________________

giac [A]  time = 0.47, size = 134, normalized size = 1.84 \[ \frac {b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, {\left (d x + c\right )} a^{3} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, {\left (6 \, a^{2} b + b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {36 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 6 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*csc(d*x+c))^3,x, algorithm="giac")

[Out]

1/8*(b^3*tan(1/2*d*x + 1/2*c)^2 + 8*(d*x + c)*a^3 + 12*a*b^2*tan(1/2*d*x + 1/2*c) + 4*(6*a^2*b + b^3)*log(abs(
tan(1/2*d*x + 1/2*c))) - (36*a^2*b*tan(1/2*d*x + 1/2*c)^2 + 6*b^3*tan(1/2*d*x + 1/2*c)^2 + 12*a*b^2*tan(1/2*d*
x + 1/2*c) + b^3)/tan(1/2*d*x + 1/2*c)^2)/d

________________________________________________________________________________________

maple [A]  time = 1.37, size = 99, normalized size = 1.36 \[ a^{3} x +\frac {a^{3} c}{d}+\frac {3 a^{2} b \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}-\frac {3 a \,b^{2} \cot \left (d x +c \right )}{d}-\frac {b^{3} \csc \left (d x +c \right ) \cot \left (d x +c \right )}{2 d}+\frac {b^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*csc(d*x+c))^3,x)

[Out]

a^3*x+1/d*a^3*c+3/d*a^2*b*ln(csc(d*x+c)-cot(d*x+c))-3*a*b^2*cot(d*x+c)/d-1/2/d*b^3*csc(d*x+c)*cot(d*x+c)+1/2/d
*b^3*ln(csc(d*x+c)-cot(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 95, normalized size = 1.30 \[ a^{3} x + \frac {b^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} - \frac {3 \, a^{2} b \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{d} - \frac {3 \, a b^{2}}{d \tan \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*csc(d*x+c))^3,x, algorithm="maxima")

[Out]

a^3*x + 1/4*b^3*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1))/d - 3*a^
2*b*log(cot(d*x + c) + csc(d*x + c))/d - 3*a*b^2/(d*tan(d*x + c))

________________________________________________________________________________________

mupad [B]  time = 0.42, size = 234, normalized size = 3.21 \[ \frac {b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {b^3\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {b^3\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2\,d}+\frac {2\,a^3\,\mathrm {atan}\left (\frac {2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}{-2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+6\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}\right )}{d}+\frac {3\,a^2\,b\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {3\,a\,b^2\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {3\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/sin(c + d*x))^3,x)

[Out]

(b^3*tan(c/2 + (d*x)/2)^2)/(8*d) - (b^3*cot(c/2 + (d*x)/2)^2)/(8*d) + (b^3*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d
*x)/2)))/(2*d) + (2*a^3*atan((2*a^3*cos(c/2 + (d*x)/2) + b^3*sin(c/2 + (d*x)/2) + 6*a^2*b*sin(c/2 + (d*x)/2))/
(b^3*cos(c/2 + (d*x)/2) - 2*a^3*sin(c/2 + (d*x)/2) + 6*a^2*b*cos(c/2 + (d*x)/2))))/d + (3*a^2*b*log(sin(c/2 +
(d*x)/2)/cos(c/2 + (d*x)/2)))/d - (3*a*b^2*cot(c/2 + (d*x)/2))/(2*d) + (3*a*b^2*tan(c/2 + (d*x)/2))/(2*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \csc {\left (c + d x \right )}\right )^{3}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*csc(d*x+c))**3,x)

[Out]

Integral((a + b*csc(c + d*x))**3, x)

________________________________________________________________________________________